h=0
s=0

def hunt_choices(round_number, current_food, current_reputation, m,  player_reputations):
    global h, s
    hunt_decisions=[]
    if round_number==1:
        for i in range(len(player_reputations)):
            hunt_decisions.append('h')
            h+=1
        return hunt_decisions
    if len(player_reputations)<=2:
        for i in range(len(player_reputations)):
            hunt_decisions.append('s')
            s+=1
        return hunt_decisions
    l=player_reputations[:]
    l.sort()
    required_h=int((h+len(l)+s)*l[int(len(l)/2)]-h)+1
    if required_h<=0:
        for i in range(len(player_reputations)):
            hunt_decisions.append('s')
            s+=1
        return hunt_decisions
    elif required_h>=len(l):
        for i in range(len(player_reputations)):
            hunt_decisions.append('h')
            h+=1
        return hunt_decisions
    for i in range(len(player_reputations)):
        hunt_decisions.append('d')
    for i in range(len(l)-required_h):
        j=player_reputations.index(l[i])
        while hunt_decisions[j]!='d':
            j=player_reputations.index(l[i],j+1)
        hunt_decisions[j]='s'
    for i in range(len(player_reputations)):
        if hunt_decisions[i]=='d':
            hunt_decisions[i]='h'
    return hunt_decisions

def hunt_outcomes(food_earnings):
    pass

def round_end(award, m, number_hunters):
    pass
